
downImg();


// 下载并保存图片
function downImg () {
  // request(data.thumbnailURL).pipe(fs.createWriteStream(__dirname + `/echarts-data/${name}.png`));

  var writeStream = fs.createWriteStream(__dirname + `/echarts/cs.png`,{autoClose:true})
  request('https://www.makeapie.com/ecg-storage/ec_gallery_thumbnail/x4SFfqL-2R.png?v=1595930308477').pipe(writeStream);

  writeStream.on('error',function(){
    addLogs(`图片写入失败`)
  })

  writeStream.on('finish',function(){
    addLogs(`图片写入成功`)
  })

}


